#include "led.h"
/// @brief Led扫描
/// @param addr 需要控制的Led的地址（0-7）
/// @param enable 控制该地址的Led是否点亮

 idata  unsigned char temp_1 = 0x00;
 idata  unsigned char temp_old_1 = 0xff;

void Led_Disp(unsigned char *ucLed)
{

   temp_1=0x00;
   temp_1 = (ucLed[0] << 0) | (ucLed[1] << 1) | (ucLed[2] << 2) | (ucLed[3] << 3) |
         (ucLed[4] << 4) | (ucLed[5] << 5) | (ucLed[6] << 6) | (ucLed[7] << 7);
  if (temp_1 != temp_old_1)
  {
    P0 = ~temp_1;
    P2 = (P2 & 0x1f) | 0x80;
    P2 &= 0x1f;
    temp_old_1 = temp_1;
  }
}

